package com.fangmao.a18_rxjava.network;

import com.fangmao.a18_rxjava.Repo;
import com.fangmao.a18_rxjava.User;

import java.util.List;

import io.reactivex.Single;
import retrofit2.http.GET;
import retrofit2.http.Path;

/**
 * @ProjectName: wman
 * @Package: com.fangmao.a04_retrofit
 * @ClassName: GitHubService
 * @Description: java类作用描述
 * @Author: wman
 * @CreateDate: 2020/2/14 13:51
 * @UpdateUser: 更新者
 * @UpdateDate: 2020/2/14 13:51
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public interface Api {
    @GET("users/{username}/repos")
    Single<List<Repo>> getRepos(@Path("username") String username);

    @GET("users/{username}/{repo_name}/forks")
    Single<List<Repo>> getForks(@Path("username") String username, @Path("repo_name") String repo_name);

    @GET("repos/rengwuxian/{repo_name}")
    Single<Repo> getRepo(@Path("repo_name") String repo_name);

    @GET("users")
    Single<List<User>> getUsers();

    @GET("users/{username}")
    Single<User> getUsers(@Path("username") String username);
}
